package com.pub.exception;

import java.io.PrintStream;



/**
 * @author ivan
 *
 */
public class InitializeException extends Exception
{
	
	private static final long serialVersionUID = 1L;

	private String messages;
	
	private Exception e;
	
	
	public InitializeException() 
	{
		super();
	}
	
	/**
	 * 
	 */
	public InitializeException(String messages) 
	{
		super(messages);
		
		this.messages 	= messages;
	}
	
	/**
	 * 
	 */
	public InitializeException(String messages, Exception e) 
	{
		super(messages);
		
		this.messages 	= messages;
		this.e			= e;
	}
	
	@Override
	public String getMessage()
	{
		return messages;
	}
	
	
	public Exception getStacks()
	{
		return e;
	}
	
	@Override
	public void printStackTrace(PrintStream p)
	{
		if(e == null)
			p.print(messages);
		else
			e.printStackTrace(p);
	}
	
}
